package ru.compft.common.utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

/**
 * User: VVasiliev
 * Date: 18.08.2011
 * Time: 13:47:26
 */
public interface GlobalConstants {

    String USER_DIR_PROP_NAME = "user.dir";

    String USER_DIR = System.getProperty(USER_DIR_PROP_NAME);
    String EOL = System.getProperty("line.separator");
    String JAXB_ENCODING = System.getProperty("jaxb.encoding", "UTF-8");

    String Y = "Y";
    String N = "N";
    String SLASH = "/";
    String SHARP = "#";
    String DOUBLE_QUOTA = "\"";
    String DOUBLE_DOT = ":";
    String DOT_COMMA = ";";
    String EMPTY_STRING = "";
    String RIGHT_PARENTHESIS = ")";
    String LEFT_PARENTHESIS = "(";
    String DEFAULT_ENCODING = "UTF-8";
    String MODULE_VERSION_PARAM_NAME = "MODULE_VERSION";
    String SUCCESS = "SUCCESS";
    String FAILURE = "FAILURE";
    String EMPTY = "empty";

    String REDIRECT = "redirect:";
    String FORWARD = "forward:";
    String ANONYMOUS = "anonymous";

    String CACHE_DATA = "/.cacheData"; // путь к файлам кеша
    String MODULES = "modules"; // путь к модулям
    String INDEX = "index"; // путь к странице по умолчанию
    String DEFAULT_MODULES_VIEW = MODULES + SLASH + INDEX;
    String LOGIN_VIEW = "login";

    String XML_FILE_SUFFIX = ".xml";
    String XHTML_FILE_SUFFIX = ".xhtml";
    String JSF_SUFFIX = ".jsf";
    String DO_SUFFIX = ".do";

    DateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
    DateFormat SIMPLE_DATE_TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

    String HH_MM_SS_FORMAT = "%02d:%02d:%02d";
    String DD_HH_MM_SS_FORMAT = "%d дней %d часов %d минут %d секунд";
    String WORKDD_HH_MM_SS_FORMAT = "%d рабочих дней %d часов %d минут %d секунд";
}
